import 'package:app_router_demo/pages/home/home_list.dart';
import 'package:app_router_demo/pages/home/home_page.dart';
import 'package:app_router_demo/pages/login/login_page.dart';
import 'package:app_router_demo/pages/message_page.dart';
import 'package:app_router_demo/pages/profile_page.dart';
import 'package:app_router_demo/pages/tab_page.dart';
import 'package:app_router_demo/pages/user_detail_page.dart';
import 'package:app_router_demo/providers/auth_provider.dart';
import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
// import 'package:provider_student/pages/login_page.dart';
// import 'package:provider_student/pages/tab_page.dart';
// import 'package:provider_student/pages/home_page.dart';
// import 'package:provider_student/pages/message_page.dart';
// import 'package:provider_student/pages/profile_page.dart';
// import 'package:provider_student/pages/user_detail_page.dart';

part 'app_router.gr.dart';

@AutoRouterConfig(replaceInRouteName: 'Page,Route')
class AppRouter extends RootStackRouter {
  final AuthGuard authGuard;
  AppRouter({required this.authGuard});

  @override
  List<AutoRoute> get routes => [
    AutoRoute(page: LoginRoute.page, path: '/login', initial: true),
    AutoRoute(
      page: TabRoute.page,
      path: '/tab',
      children: [
        AutoRoute(page: HomeRoute.page, path: 'home'),
        AutoRoute(page: MessageRoute.page, path: 'message'),
        AutoRoute(page: ProfileRoute.page, path: 'profile'),
      ],
    ),
    AutoRoute(page: UserDetailRoute.page, path: '/user-detail'),
    AutoRoute(page: HomeListRoute.page, path: '/home-list'),
  ];
}
